package concole;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class IOHelperTest {

	@Before
	public void setUp() throws Exception {
	}

	@Test
	public void testIfExisted() {
		Boolean b = IOHelper.ifExisted(0, "LoginAccounts.txt", "admin");
		assertTrue(b);
	}

	@Test
	public void testFindOneRecordIntStringString() {
		String string = IOHelper.findOneRecord(0, "LoginAccounts.txt", "admin");
		assertEquals(string.trim(), "admin 11111111");
	}

	@Test
	public void testFindOneRecordIntStringStringString() {
		String string = IOHelper.findOneRecord(0, 1, "LoginAccounts.txt",
				"admin", "11111111");
		assertNotNull(string);

	}

}
